#!/usr/bin/env python
# -*- coding: utf-8 -*-
from models import *
from django.contrib import admin

class RegionEntryAdmin(admin.TabularInline):
    model = RegionEntry
    extra = 5

class CountryAdmin(admin.ModelAdmin):
    search_fields = ('printable_name', 'iso')
    list_display = ('printable_name', 'iso', 'active')
    list_filter = ('active',)
    inlines = [RegionEntryAdmin]
    
admin.site.register(Country, CountryAdmin)

class PostalCodeAdmin(admin.ModelAdmin):
    list_display = ('country', 'zip', 'zip_type')
    search_fields = ('country', 'zip')
    
admin.site.register(PostalCode, PostalCodeAdmin)
